package com.aviation.sell_ticket.mapper;

import com.aviation.sell_ticket.pojo.Aviation_city;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CityMapper {

    @Select("select * from aviation_city")
    public List<Aviation_city> getCity();

    @Select("select city_id,city_name from aviation_city where city_name=#{cityName}")
    public Aviation_city obtainCity(@Param("cityName") String cityName);

    @Select("select city_id,city_name from aviation_city where city_id=#{cityId}")
    public Aviation_city transferCity(@Param("cityId") Integer cityId);

}
